import { axios } from '@/utils/request'
import {ExcelDownLoad} from "@/myService/FileDownLoad";

let baseUrl="/data-governance/handleTemporary";


export default {
  getProblemTerritory: function(params) {
    return axios({
      url: baseUrl + "/getProblemTerritory",
      method: "GET",
      params: params
    })
  },
  getTemporaryOrderInfo:function (params){
    return axios({
      url:baseUrl+"/getTemporaryOrderInfo",
      method:"GET",
      params:params
    })
  },
  getPretreatmentStatistics:function (params){
    return axios({
      url:baseUrl+"/getPretreatmentStatistics",
      method:"GET",
      params:params
    })
  },
  savaSearchResult:function (data){
    return axios({
      url:baseUrl+"/keepSearchResult",
      method:"POST",
      data:data
    })
  },
  getPeriodStatistics:function (params){
    return axios({
      url:baseUrl+"/getPeriodStatistics",
      method:"GET",
      params:params
    })
  },
  getTemporaryOrder:function (params) {
    return axios({
      url:baseUrl+"/getTemporaryOrder",
      method:"GET",
      params:params,
    })
  },
  downLoadTemporaryOrder:function (id) {
    return axios({
      url:baseUrl+"/downLoadTemporaryOrder",
      method:"GET",
      params: { id:id },
      responseType: 'blob'
    }).then(res => {
      ExcelDownLoad(res);
    })
  },
  delTemporary:function(id){
    return axios({
      url:baseUrl+"/delTemporary",
      method:"DELETE",
      params: { id:id }
    })
  }
}